import request from '../utils/request';
// import { useTokenStore } from '../stores/token';
// 作业列表

export const getAssignmentService = (pageData) => {
    return request.get('/assignment/list',{params:pageData})
}

export const getByIdAssignmentService = (assId) => {
    return request.get('/assignment/'+assId)
}
export const addAssignmentService = (data) => {
    return request.post('/assignment/add', data)
}

export const deleteAssignmentService = (id) => {
    return request.delete('/assignment/delete/'+id)
}

// 课程数据修改
export const updateAssignmentService = (data) => {
    return request.put('/assignment/update', data)
}

//学生根据课程id获取作业列表
export const getAssignmentListByCourseIdService = (courseId) => {
    return request.get('/assignment/listByCourseId/'+courseId)  
}